package com.gton.io;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @description: 服务间的RPC调用公共响应参数模板
 * 充血型模型
 * @author: GuoTong
 * @createTime: 2022-10-22 16:03
 * @since JDK 1.8 OR 11
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RPCCommonResponse<T> implements Serializable {

    /**
     * Description:状态码
     */
    public String code;

    /**
     * Description: 提示信息
     */
    public String msg;

    /**
     * Description:返回的数据
     */
    public T data;

    /**
     * Description: Dubbo链路追踪唯一ID
     *
     * @author: GuoTong
     * @date: 2022-10-19 20:23:36
     */
    public String traceId;

    /**
     * Description: RPC 的发起方
     *
     * @author: GuoTong
     * @date: 2022-10-19 20:25:37
     */
    public String formServer;


    /**
     * Description: RPC 的接收方
     *
     * @author: GuoTong
     * @date: 2022-10-19 20:25:37
     */
    public String toServer;

    /**
     * Description: 响应结束时间
     *
     * @author: GuoTong
     * @date: 2022-10-19 20:26:58
     */
    public LocalDateTime endTime;


    /**
     * Description: 版本
     *
     * @author: GuoTong
     * @date: 2022-10-19 20:27:23
     */
    public String version;


}
